<h3><%= currency.code.upcase %> deposits</h3>
<div class="card">

  <%= table_for @deposits, class: 'table table-bordered table-striped' do |t| %>
    <% t.column :txid do |x| %>
      <a href="<%= x.transaction_url %>" target="_blank">
        <code class="text-info"><%= x.txid.truncate(36) %></code>
      </a>
    <% end %>
    <% t.column :created_at %>
    <% t.column 'Currency' do |x| %>
      <% x.currency.code.upcase %>
    <% end %>
    <% t.column 'Member email' do |x| %>
      <%= link_to x.member.email, url_for([:admin, x.member]), target: '_blank' %>
    <% end %>
    <% t.column :amount do |x| %>
      <code class="text-info"><%= x.amount %></code>
    <% end %>
    <% t.column :confirmations do |x| %>
      <span class="badge"><%= x.confirmations %></span>
    <% end %>
    <% t.column :state_and_actions do |x| %>
      <span><%= x.aasm_state.humanize %></span>
      <% if x.may_accept? %>
        <span> / </span>
        <%= link_to t('admin.deposits.coins.index.accept'),
                    admin_deposit_path(x.currency.code, x),
                    method:  'PATCH',
                    confirm: t('admin.deposits.coins.index.accept_confirm') %>
      <% end %>
    <% end %>
  <% end %>
</div>

<div class="pull-right">
  <%= paginate @deposits, params: { route: :admin_deposit_index } %>
</div>
